import Vue from 'vue'
import Router from 'vue-router'
import Home from './../pages/Home/Home'
import Recommend from './../pages/Recommend/Recommend'
import Me from './../pages/Me/Me'
import Login from './../pages/Login/Login'
import Cart from './../pages/Cart/Cart'
import Search from './../pages/Search/Search'
import Hot from './../pages/Home/Children/Hot/Hot'
import Box from './../pages/Home/Children/Box'
import Dress from './../pages/Home/Children/Dress'
import Ele from './../pages/Home/Children/Ele'
import Food from './../pages/Home/Children/Food'
import General from './../pages/Home/Children/General'
import Man from './../pages/Home/Children/Man'
import Mbaby from './../pages/Home/Children/Mbaby'
import Shirt from './../pages/Home/Children/Shirt'

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/home',
      name: 'Home',
      component: Home,
      children: [
        {
          path: 'hot',
          component: Hot 
        },
        {
          path: 'box',
          component: Box 
        },
        {
          path: 'dress',
          component: Dress 
        },
        {
          path: 'ele',
          component: Ele 
        },
        {
          path: 'food',
          component: Food 
        },
        {
          path: 'general',
          component: General 
        },
        {
          path: 'man',
          component: Man 
        },
        {
          path: 'mbaby',
          component: Mbaby 
        },
        {
          path: 'shirt',
          component: Shirt 
        },
        {
          path: '/home',
          redirect: '/home/hot'
        }
    ]
    },
    {
      path: '/login',
      name: 'Login',
      component: Login
    },
    {
      path: '/cart',
      name: 'Cart',
      component: Cart
    },
    {
      path: '/me',
      name: 'Me',
      component: Me
    },
    {
      path: '/recommend',
      name: 'Recommend',
      component: Recommend
    },
    {
      path: '/search',
      name: 'Search',
      component: Search
    },{
      path: '/',
      redirect: '/home'
    }
  ]
})
